<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/23 0023
 * Time: 23:24
 */
//$mysqli = mysqli_init();
//$mysqli->options(MYSQLI_INIT_COMMAND, "SET　AUTOCOMMIT=0");
//$mysqli->options(MYSQLI_READ_DEFAULT_FILE, "SSL_CLIENT");
//$mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 5);
$conn = mysqli_connect('localhost', 'root', 'root', 'aiziji');
//$conn = $mysqli->real_connect('localhost', 'root', 'root', 'aiziji');

if (mysqli_connect_errno()) {
    die(mysqli_connect_error());
}

//$result = $conn->query("select * from aiziji_admin_user");
//
//while ($row = $result->fetch_row()) {
//    var_dump($row);
//}
//批量sql
$sql = "select * from aiziji_admin_user";
$sql .= " select * from aiziji_auth_list";
var_dump($conn->multi_query($sql));
if ($conn->multi_query($sql)) {
    do {
        if ($result = $conn->store_result()) {
            while ($row = $result->fetch_row()) {
                var_dump("COL: %s\n", $row);
            }
            $result->close();
        }
    } while ($conn->next_result());
}
//$result->free();
$conn->close();